package com.jh.user.business;

import cn.jh.common.exception.ServiceException;
import com.jh.user.pojo.ChannelRate;
import com.jh.user.pojo.User;
import com.jh.user.pojo.enums.UserGrade;

public interface UserBusiness {
    /** 根据userId查询用户信息 */
    public User findUserById(long userId);

    void updateShopStatus(User user);

    public User getByPhone(String phone);

    int findUserListByPreUserId(long userId);

    /**
     * 用户升级
     *
     * @param userId 用户id
     * @param grade 升入的等级
     * @return 返回用户信息
     * @throws ServiceException 业务处理异常时抛出
     */
    User upGrade(long userId, UserGrade grade) throws ServiceException;

    void upGradeToModifyMerchantFeeInfo(ChannelRate oldCr, ChannelRate newCr) throws ServiceException;
}
